﻿using Google.Translates.WebService.TranslateParmas;

namespace Google.Translates.WebService.Rules
{
    public class TextTransmissionRule : BaseRule
    {
        /// <summary>
        /// 檢驗是否可以有效地進行Google Translate Api的調用
        /// 這個檔需要做的步驟,如下
        /// 1.Source-Language-Code與Target-Language-Code是否有效
        /// 2.是否有效需要檢驗SourceContext是否是有效的文字
        /// </summary>
        /// <param name="inputParma"></param>
        /// <returns></returns>
        public string CheckInputParmaIsUseful(TextTransmissionParma inputParma)
        {
            return CheckTheLanguageCodeIsUseful(inputParma.SourceLanguageCode, inputParma.TargetLanguageCode);
        }
    }
}
